<%--
说明：用户组可选择的授权资源 页面

@author liuxun 2012-03-26
--%>
<%@ include file="../../common/common.jsp"%>
<%
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setDateHeader("Expires", 0);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<title>用户组可选择的授权资源</title>
<script src="jsp/accessctl/d_acl/d_acl_usrgrp_selected_reactive_rsc.js" type="text/javascript" charset="UTF-8"></script>
<style type="text/css">
.tableRow {
	text-align: center; 
	background-color: #f3f7fd; 
	border-top-width: 1px;
	border-right-width: 1px;
	border-top-style: solid;
	border-right-style: solid;
	border-bottom-style: none;
	border-left-style: none;
	border-top-color: #FFFFFF;
	border-right-color: #FFFFFF;
}
</style>
</head>

<body>
  <%-- 查询条件form --%>
  <form id="opeForm" name="opeForm" method="post">
    <input type="hidden" id="auth_obj_id" name="model.auth_obj_id" value="${model.auth_obj_id}" />
    
    <table id="rscTable" width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
      <tr style="width: 100%" class="tableRow">
        <td class="" colspan="9" width="100%">
          <table id="listTable" width="100%">
          <thead>
      <tr align="center" style="text-align: center; width: 100%">
        <td class="tableRow" align="center" style="width: 4%;" nowrap="nowrap">
        	<input type="checkbox" onclick="checkAll(this)"/>
        </td>
        <td class="tableRow" align="center" style="width: 8%;" nowrap="nowrap">节点名称</td>
      	<td class="tableRow" align="center" style="width: 10%;" nowrap="nowrap">资源组</td>
      	<td class="tableRow" align="center" style="width: 10%;" nowrap="nowrap">资源</td>
      	<td class="tableRow" align="center" style="width: 8%;" nowrap="nowrap">账号</td>
      	<td class="tableRow" align="center" style="width: 3%;" nowrap="nowrap">协议</td>
      	<td class="tableRow" align="center" style="width: 5%;" nowrap="nowrap">端口</td>
      	<td class="tableRow" align="center" style="width: 5%;" nowrap="nowrap">运维目的</td>
      	<td class="tableRow" align="center" style="width: 2%;" nowrap="nowrap">长期有效</td>
      	<td class="tableRow" align="center" style="width: 12%;" nowrap="nowrap">开始时间</td>
      	<td class="tableRow" align="center" style="width: 4%;" nowrap="nowrap">有效期(分钟)</td>
      	<td class="tableRow" align="center" style="width: 15%;" nowrap="nowrap">命令策略</td>
      </tr>
      </thead>    
      <tbody>
      <c:forEach var="rsc" items="${activatelsit}" varStatus="status">
	  	<tr>
          <td class="tableRow" align="center" nowrap="nowrap" style="width:4%;">
          	<input type="checkbox" name=""/>
          	<input type="hidden" id="acl_id_${status.index}" value="${rsc.ACL_ID}" />
          </td>	  	
          <td class="tableRow" align="center" style="width: 8%;">
          	${rsc.NODE_DECODE}
          </td>          
          <td class="tableRow" align="center" style="width: 10%;">
          	${rsc.RSC_GRP_NAME}
          </td>
          <td class="tableRow"  align="left" style="width: 10%;" nowrap="nowrap">
          	${rsc.RSC_NAME}
          </td>
          <td class="tableRow" align="center" style="width: 5%;">
          	${rsc.RSC_ACC}
          </td>
          <td class="tableRow" align="center" style="width: 3%;">
          	${rsc.PRO_NAME}
          </td>
          <td class="tableRow" align="center" style="width: 5%;">
          	${rsc.PORT}
          </td>
          <td class="tableRow" align="center" style="width: 5%;">
          	<ext:select id="operation_type_${status.index}" name="model.operation_type" cachetype="P_TYPE_VALUE" nameprop="type_value_name" valueprop="type_value_code" condnames="type_code" condvalues="121" initvalue="${rsc.OPERATION_TYPE_CODE }" style="width:80px" orderby="type_value_code" />
          </td>             
          <td class="tableRow" align="center" style="width: 2%;">
          	<select id="is_longterm_valid_${status.index}" onchange="is_longterm_valid(${status.index})" style="width: 80%">
          		<option value="1" <c:if test="${rsc.IS_LONGTERM_VALID == 1}">selected</c:if> >是</option>
          		<option value="0" <c:if test="${rsc.IS_LONGTERM_VALID == 0}">selected</c:if>>否</option>
          	</select>
          </td>
          <td class="tableRow" align="left" style="width: 12%; text-align: left;">
          	<input type="text" id="start_time_${status.index }" <c:if test="${ rsc.IS_LONGTERM_VALID == 1}">disabled="disabled"</c:if> value="${rsc.START_TIME}" readonly="readonly" style="width: 130px" class="easyui-validatebox  editMainText" maxlength=19 />
          	<c:if test="${rsc.IS_LONGTERM_VALID == 0}" >
          		<img id="img_${status.index}" src="<c:url value="/images/datetimepicker_css/cal.gif" />" onclick="javascript:NewCssCal ('start_time_${status.index }','yyyyMMdd','dropdown',true,'24',true,'future')" style="cursor: pointer" />
          	</c:if>
          	<c:if test="${rsc.IS_LONGTERM_VALID == 1}" >
          		<img id="img_${status.index}" style="display: none" src="<c:url value="/images/datetimepicker_css/cal.gif" />" onclick="javascript:NewCssCal ('start_time_${status.index }','yyyyMMdd','dropdown',true,'24',true,'future')" style="cursor: pointer" />
          	</c:if>
          </td>
          <td class="tableRow" align="center" style="width: 4%;" nowrap="nowrap">
          	<input type="text" id="available_length_${status.index}" <c:if test="${ rsc.IS_LONGTERM_VALID == 1}">disabled="disabled"</c:if> value="${rsc.AVAILABLE_LENGTH}" style="width: 98%" class="easyui-validatebox" validType="digit" />
          </td> 
          <td class="tableRow" align="center" style="width: 15%;">
          	<input type="text" id="policy_name_${status.index}" value="${rsc.CMD_POLICY_NAME}" readonly="readonly" style="width: 98%" class="easyui-validatebox" validType="" />
          </td>
      </tr>
	  </c:forEach>
	  </tbody>
          </table>
          </td>
      </tr>
      <tr style="height: 100%">
        <td class="tableRow" colspan="9">
        </td>
       </tr>
      <tr>
        <td class="editMainBottomTD" colspan="12">&nbsp;
          <div style="text-align: content; padding: 5px; padding-bottom: 35px">        
           <a href="javascript:void(0)" id="okBtn" icon="icon-save" class="easyui-linkbutton">保存</a> 
           <a href="javascript:void(0)" id="cancelBtn" icon="icon-cancel" class="easyui-linkbutton">取消</a>
          </div></td>
      </tr>
    </table>
  </form>

</body>
</html>
